// 检查是否可以预览
export function checkPreviewName(fileName) {
  let flag = false
  if (typeof fileName === 'string') {
    let fileToLowerCase = fileName.toLowerCase()
    if (fileToLowerCase.match(/.(doc|docx)$/)) {
      flag = true
    }
    if (fileToLowerCase.match(/.pdf$/)) {
      flag = true
    }
  }
  return flag
}

export function checkPreviewSize(fileSize) {
  return (fileSize / 1024 / 1024) <= 15
}
